<?php
/**
 * 产品中心类别列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	product
 */
require_once('config/config.inc.php');
require_once("class/product.class.php");

$objWebInit = new product();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//翻页参数
$objWebInit->arrGPage = $arrGPage;

//图片参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();

$arrParentType = array();
$arrParentType = $objWebInit->getTypeList(' where type_pass=1 ',' order by initial,type_sort desc');
$arrParentType = $objWebInit->formatTypeList(0,$arrParentType,false);

foreach ($arrParentType as $k=>$v){
	if($v['type_parentid'] == 0){
		$strTempK = $k;
		$strTempTypeID = $v['type_id'];
	}else{
		$arrParentType[$strTempK]['child'][] = $v;
		unset($arrParentType[$k]);
	}
}

//调用推荐品牌bloak
include '../brand/block/top.php';

//全站公用block
@include '../_block.php';


//输出到模板
$arrMOutput["smarty_assign"]['arrParentType'] = $arrParentType;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'].'index.html';
$objWebInit->output($arrMOutput);
?>